﻿// Core
Global.loadCss(Config.cssUrl + System.Web.Runtime.skin + "/global.css");
Global.loadCss(Config.cssUrl + System.Web.Runtime.skin + "/content.css");
Global.loadCss(Config.cssUrl + System.Web.Runtime.skin + "/jquery.tooltip.css");
/*
Global.loadCss("Resources/Css/content.css");
Global.loadCssIf("lt IE 8", "iefix.css");
Global.loadCssIf("IE 8", "ie8fix.css");
*/


Global.loadScript('text/javascript', 'http://stevenlevithan.com/assets/misc/date.format.js');
// handler

Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Enum.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/ExceptionHandler.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/StringHandler.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/UrlHandler.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/PathHandler.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/RequestHandler.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/LogWriter.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/HtmlLogWriter.js');

Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Handler/LogHandler.js');


// base control
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/BaseControl.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/BaseMasterPage.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/BasePage.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/BaseUserControl.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/BaseMasterPage.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/BasePage.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/Repeater.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/UI/Menu.js');
// Web
Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/Handler/MessageHandler.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/Handler/RequestHandler.js');

Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/UserControl/SearchOnMapOption.js');

Global.loadScript('text/javascript', Config.jsUrl + 'System/Core/Dictionary.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Entity/User.js');

Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/MasterPage/Default.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/Page/Home.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/Page/SendMessage.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/Page/InviteFriend.js');
Global.loadScript('text/javascript', Config.jsUrl + 'System/Web/Page/Register.js');


Global.loadScript('text/javascript',Config.jsUrl + 'System/Web/Lang/'+ System.Web.Runtime.lang +'/Lang.js');

var control;
$(document).ready(function() {

    try{
        Config.runningMode=System.Core.Enum.RunningMode.debug;
        Config.requestType = System.Core.Handler.RequestType.Opensocial8;
        
        logger.createWriter();
        
        control = new System.Web.MasterPage.Default({
            wrapper: ".MainContentWrapper"
        });
        control.render();
        abc.rtest='sdfsdfsd';
    }catch(e){
        logger.error(e.message);
        //alert(e.message);
    }
});
